﻿using System;

namespace GameOfLife {

    /// <summary>
    /// A Runner strategy returning the Console solution
    /// </summary>
    class ConsoleRunStrategy : IRunStrategy {

        public void Runner(int size) {
            Game GoL = new Game(size);
            int run = 1;
            while (true) {
                Console.WriteLine("Run: " + run + "\t(press ANY KEY to quit)");
                Console.WriteLine("-------------------------------");
                run++;

                GoL.draw();
                GoL.NextDay();

                if (Console.KeyAvailable) break;
                System.Threading.Thread.Sleep(100);
                //Console.ReadKey();
                Console.Clear();
            }
        }
    }
}
